package text_2023_09_20;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/20 20:56:52
 */

class Account{
    public String id;
    public String name;
    public double money;
    public Account(String id,String name,double money){
        this.id = id;
        this.name = name;
        this.money = money;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }
}
public class BankAccount {
    public static void creatAccount(){
        Account a1 = new Account("a","A",100);
        Account a2 = new Account("b","B",200);
        Account a3 = new Account("c","C",300);
        Account a4 = new Account("d","D",400);
        Account a5 = new Account("e","E",500);
        Account a6 = new Account("f","F",600);
    }
    public static void main(String[] args) {
        HashMap<String,Double> map = new HashMap<>();
        Account a1 = new Account("a","A",100);
        Account a2 = new Account("b","B",200);
        Account a3 = new Account("c","C",300);
        Account a4 = new Account("d","D",400);
        Account a5 = new Account("e","E",500);
        Account a6 = new Account("f","F",600);
        map.put(a1.getId(),a1.getMoney());
        map.put(a2.getId(),a2.getMoney());
        map.put(a3.getId(),a3.getMoney());
        map.put(a4.getId(),a4.getMoney());
        map.put(a5.getId(),a5.getMoney());
        for(Map.Entry<String,Double> tem : map.entrySet()){
            System.out.println("ID :" + tem.getKey() + " 余额是 ： "+tem.getValue());
        }
    }

}
